//
//  WSDataReportFilterManager.h
//  microvision
//
//  Created by zhenjingxiong on 2021/3/2.
//  Copyright © 2021 tencent. All rights reserved.
//

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN

@protocol WSDataReportManagerDelegate <NSObject>

- (void)updatedFilterDataSource;

- (void)updateFilterConditionViewContent:(NSString *)filterContent;

@end

@interface WSDataReportFilterManager : NSObject

// 过滤出来的数据源
@property (nonatomic, copy) NSArray<NSDictionary *> *filterDataSource;
// WSDataReportFullScreenViewController搜索的关键词key
@property (nonatomic, copy) NSString *serachKey;
// 观察者列表
@property (nonatomic, strong, readonly) NSHashTable<id<WSDataReportManagerDelegate>> *observerList;

+ (instancetype)instance;
// 更新数据源
- (void)updateFilterDataSource;
// 清除筛选条件
- (void)clearFilterFilterConditions;
// 通过筛选条件更新数据
- (void)updateDataByFilterConditions;
// 筛选条件视图的内容
- (NSString *)filterConditionViewContent;
// 通过searcchKey更新过滤数据
- (void)updateSearchKey:(NSString *)searchKey;
// 注册观察者
- (void)registerObserver:(id<WSDataReportManagerDelegate>)observer;
// 移除观察者
- (void)unregisterObserver:(id<WSDataReportManagerDelegate>)observer;


@end

NS_ASSUME_NONNULL_END
